import { FormRule, PrimaryTableCol } from 'tdesign-vue-next';

/**
 * 搜索表单项
 */
export const getSearchParams = () => [
  {
    label: '标签名称',
    key: 'tagName',
    hide: false,
  },
];

/**
 * 表格列
 */
export const getColumns = (): PrimaryTableCol[] => [
  {
    title: '标签名称',
    ellipsis: true,
    align: 'center',
    colKey: 'tagName',
  },
];

/**
 * 表单校验规则
 */
export const getRules = (): Record<string, FormRule[]> => ({
  tagName: [{ required: true, message: '请输入标签名称', type: 'error', trigger: 'blur' }],
});
